package com.ww.demo.newcoder;

import java.util.Scanner;

public class Main6 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
       while (true) {
           n = getZhiyinzi(n);
           if (n == 0) {
               break;
           }

       }


    }
    private static int getZhiyinzi(int n){
        for (int i = 2; i<= n ; i++){
            if (n % i == 0) {
                System.out.println(i);
                return n / i;
            }
        }
        return 0;
    }
}
